Expense Tracker
Core release · 100% complete .NET 8 React + Vite SQL Server JWT Auth MIT License

Make money
make sense.

A full-stack personal finance app that helps you record transactions, organize spending, and see exactly where your money goes — built with ASP.NET Core 8 and React.

01Features

Everything you need to see the full picture

A practical layered backend paired with a responsive frontend — built for clarity, not complexity.

🔐

Your own space

Registration and login with JWT authentication, and BCrypt password hashing — plaintext passwords are never stored.

💳

Full transaction CRUD

Create, view, edit, and delete personal income and expense records, each scoped to the owning user.

🔎

Find it fast

Search by term, filter by type/category/date range, and page through results with server-side sorting.

🗂️

Ready-to-use categories

Eight seeded global categories: Food, Transport, Shopping, Bills, Entertainment, Health, Salary, and Other.

📊

Financial overview

Dashboard aggregates for income, expenses, balance, category totals, monthly trends, and recent activity.

🛡️

Safe by design

FluentValidation request rules, centralized exception handling, and DTOs that never expose persistence entities.

02Delivered

What's shipped

The core release is complete — every item below is implemented, working, and part of the current codebase.

Backend

✓
User registration and login with JWT authentication
✓
Secure password hashing with BCrypt
✓
Full transaction CRUD — create, read, update, delete
✓
Filtering by type, category, date range, and search term
✓
Server-side pagination and sorting
✓
Eight seeded global categories
✓
Dashboard aggregates for income, expenses, balance & trends
✓
FluentValidation-powered request validation
✓
Centralized exception handling, consistent error format
✓
Per-user ownership enforcement and IDOR prevention
✓
DTOs separated from persistence entities
✓
Layered Controllers → Services → DbContext design

Frontend

✓
React application powered by Vite
✓
Fully responsive interface styled with Tailwind CSS
✓
Client-side navigation with React Router
✓
Authentication and transaction-management workflows
✓
Dashboard presentation for financial summaries
✓
Polished, accessible interface
✓
Interactive data visualizations with Recharts
03Stack

Built with

BackendASP.NET Core 8Entity Framework Core 8FluentValidationSwagger / OpenAPI
FrontendReactViteTailwind CSSReact RouterRecharts
DatabaseSQL Server
Auth & SecurityJWTBCrypt
04Architecture

Simple, layered — on purpose

A modular layered monolith. Controllers handle HTTP, services hold the rules, and Entity Framework Core manages persistence. No microservices, no CQRS, no ceremony.

React Client
HTTP / JSON + JWT
Controllers
HTTP concerns
Services
Business rules
EF Core
DbContext
SQL Server
Persistence
Validation runs at the controller boundary · ownership checks run inside services
05Setup

Run it locally

Works on Windows, macOS, or Linux. You'll need the .NET 8 SDK, Node.js with npm, SQL Server (or a compatible instance), and Git.

Clone the repository

Pull the project down and move into the project directory.

Configure and run the backend

Restore packages, apply migrations, and start the API from backend/ExpenseTracker.Api.

Configure and run the frontend

Install dependencies and start the Vite dev server from frontend.

terminal — backend
# 1. clone
git clone https://github.com/here-is-leo/expense-tracker.git
cd expense-tracker

# 2. backend
cd backend/ExpenseTracker.Api
dotnet restore
dotnet ef database update
dotnet run
appsettings.Development.json
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Database=ExpenseTrackerDb;Trusted_Connection=True;TrustServerCertificate=True"
  },
  "Jwt": {
    "Key": "replace-with-a-long-development-secret",
    "Issuer": "ExpenseTracker.Api",
    "Audience": "ExpenseTracker.Client"
  }
}
terminal — frontend
cd ../../frontend
npm install
npm run dev

# .env (if required)
VITE_API_BASE_URL=https://localhost:5001/api

Never commit production secrets — use environment variables, .NET user secrets, or a dedicated secrets manager.

06Reference

API at a glance

Full endpoint documentation lives in docs/API.md. Swagger UI is available at /swagger in development.

MethodEndpointPurpose
POST/api/auth/registerRegister a user
POST/api/auth/loginAuthenticate and receive a JWT
GET/api/transactionsList, filter, sort, and paginate transactions
GET/api/transactions/{id}Retrieve one owned transaction
POST/api/transactionsCreate a transaction
PUT/api/transactions/{id}Update an owned transaction
DELETE/api/transactions/{id}Delete an owned transaction
GET/api/categoriesList global categories
GET/api/dashboardRetrieve financial aggregates and recent activity
07Security

Safe by default

🔑

JWT-based authentication for every protected API operation

🔒

BCrypt password hashing — plaintext passwords are never stored

🛡️

Ownership checks on user-scoped resources to prevent IDOR vulnerabilities

🕵️

404 responses for inaccessible resources, so existence is never revealed

✅

Server-side validation with FluentValidation on every request

⚠️

Centralized exception handling with consistent error responses

📦

DTOs prevent persistence entities from being exposed directly

💰

Fixed-precision decimal / numeric(18,2) values for monetary data

08Roadmap

Where it's headed

The core release is feature-complete. Everything below in the current stage is shipped; future stages are exploratory.

Core release
Complete
JWT authentication, BCrypt hashing, transaction CRUD, filters, pagination, sorting, categories, dashboard aggregates, validation, error handling, ownership enforcement, Recharts visualizations, and layered organization.
Next up
Exploring
Budgets, recurring transactions, data exports, richer analytics, notifications, and broader customization.
09Team

Meet the developer

Ilia Farahani
Ilia Farahani · ایلیا فراهانی
Senior Developer — Project Lead

"Reliable software begins with clear boundaries and thoughtful decisions."

@here-is-leo on GitHub →
نسخه اصلی · ۱۰۰٪ تکمیل‌شده .NET 8 React + Vite SQL Server JWT مجوز MIT

پول را قابل‌فهم کن.

یک اپلیکیشن کامل مدیریت مالی شخصی که به شما کمک می‌کند تراکنش‌ها را ثبت کنید، هزینه‌ها را سازمان‌دهی کنید و دقیقاً ببینید پولتان کجا می‌رود — ساخته‌شده با ASP.NET Core 8 و React.

۰۱قابلیت‌ها

همه‌چیز برای دیدن تصویر کامل

یک بک‌اند لایه‌بندی‌شدهٔ کاربردی همراه با رابطی واکنش‌گرا — ساخته‌شده برای شفافیت، نه پیچیدگی.

🔐

حساب شخصی امن

ثبت‌نام و ورود با احراز هویت JWT و هش گذرواژه با BCrypt — گذرواژهٔ خام هرگز ذخیره نمی‌شود.

💳

مدیریت کامل تراکنش‌ها

ایجاد، مشاهده، ویرایش و حذف تراکنش‌های درآمد و هزینه، هرکدام متعلق به کاربر مالک.

🔎

جست‌وجوی سریع

جست‌وجو با عبارت، فیلتر بر اساس نوع/دسته/بازه زمانی، و صفحه‌بندی با مرتب‌سازی سمت سرور.

🗂️

دسته‌های آماده

هشت دسته‌بندی عمومی اولیه: خوراک، حمل‌ونقل، خرید، قبوض، سرگرمی، سلامت، حقوق و سایر.

📊

نمای کلی مالی

محاسبات داشبورد برای درآمد، هزینه، موجودی، جمع دسته‌بندی‌ها، روند ماهانه و فعالیت‌های اخیر.

🛡️

ایمن از پایه

اعتبارسنجی با FluentValidation، مدیریت متمرکز خطاها، و DTOهایی که هرگز موجودیت‌های داده را افشا نمی‌کنند.

۰۲تحویل‌شده

چه چیزی آماده است

نسخهٔ اصلی کامل است — هر مورد زیر پیاده‌سازی شده، کار می‌کند و بخشی از کدبیس فعلی است.

بک‌اند

✓
ثبت‌نام و ورود کاربران با احراز هویت JWT
✓
هش امن گذرواژه‌ها با BCrypt
✓
مدیریت کامل تراکنش‌ها — ایجاد، خواندن، ویرایش، حذف
✓
فیلتر بر اساس نوع، دسته، بازهٔ زمانی و عبارت جست‌وجو
✓
صفحه‌بندی و مرتب‌سازی سمت سرور
✓
هشت دسته‌بندی عمومی اولیه
✓
محاسبات داشبورد برای درآمد، هزینه، موجودی و روندها
✓
اعتبارسنجی درخواست‌ها با FluentValidation
✓
مدیریت متمرکز خطاها با قالب پاسخ یکپارچه
✓
کنترل مالکیت هر کاربر و جلوگیری از IDOR
✓
جداسازی DTOها از موجودیت‌های پایگاه داده
✓
طراحی لایه‌ای Controllers → Services → DbContext

فرانت‌اند

✓
اپلیکیشن React مبتنی بر Vite
✓
رابط کاملاً واکنش‌گرا با Tailwind CSS
✓
مسیریابی سمت کاربر با React Router
✓
فرایندهای احراز هویت و مدیریت تراکنش
✓
نمایش خلاصهٔ اطلاعات مالی در داشبورد
✓
رابط کاربری صیقل‌خورده و دسترس‌پذیر
✓
نمودارهای تعاملی داده با Recharts
۰۳فناوری‌ها

ساخته‌شده با

بک‌اندASP.NET Core 8Entity Framework Core 8FluentValidationSwagger / OpenAPI
فرانت‌اندReactViteTailwind CSSReact RouterRecharts
پایگاه دادهSQL Server
احراز هویت و امنیتJWTBCrypt
۰۴معماری

ساده و لایه‌بندی‌شده — عمداً

یک مونولیت ماژولار و لایه‌بندی‌شده. کنترلرها مسئول HTTP، سرویس‌ها محل قوانین، و Entity Framework Core مسئول ذخیره‌سازی است. بدون میکروسرویس، بدون CQRS، بدون تشریفات اضافه.

React Client
HTTP / JSON + JWT
Controllers
مفاهیم HTTP
Services
قوانین کسب‌وکار
EF Core
DbContext
SQL Server
ذخیره‌سازی
اعتبارسنجی در مرز کنترلر اجرا می‌شود · کنترل مالکیت داخل سرویس‌ها انجام می‌شود
۰۵راه‌اندازی

اجرای محلی پروژه

روی ویندوز، macOS و لینوکس قابل اجراست. به .NET 8 SDK، Node.js همراه npm، SQL Server (یا نمونه‌ای سازگار) و Git نیاز دارید.

دریافت مخزن

پروژه را کلون کنید و وارد پوشهٔ آن شوید.

پیکربندی و اجرای بک‌اند

وابستگی‌ها را نصب کنید، مایگریشن‌ها را اعمال کنید و API را از backend/ExpenseTracker.Api اجرا کنید.

پیکربندی و اجرای فرانت‌اند

وابستگی‌ها را نصب کرده و سرور توسعهٔ Vite را از پوشهٔ frontend اجرا کنید.

ترمینال — بک‌اند
# ۱. کلون پروژه
git clone https://github.com/here-is-leo/expense-tracker.git
cd expense-tracker

# ۲. بک‌اند
cd backend/ExpenseTracker.Api
dotnet restore
dotnet ef database update
dotnet run
appsettings.Development.json
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Database=ExpenseTrackerDb;Trusted_Connection=True;TrustServerCertificate=True"
  },
  "Jwt": {
    "Key": "replace-with-a-long-development-secret",
    "Issuer": "ExpenseTracker.Api",
    "Audience": "ExpenseTracker.Client"
  }
}
ترمینال — فرانت‌اند
cd ../../frontend
npm install
npm run dev

# .env (در صورت نیاز)
VITE_API_BASE_URL=https://localhost:5001/api

اسرار محیط عملیاتی را هرگز در مخزن ثبت نکنید — از متغیرهای محیطی، User Secrets یا سامانهٔ مدیریت اسرار استفاده کنید.

۰۶مرجع

نمای کلی API

مستندات کامل endpointها در docs/API.md است. رابط Swagger در محیط توسعه از مسیر /swagger در دسترس است.

متدمسیرکاربرد
POST/api/auth/registerثبت‌نام کاربر
POST/api/auth/loginورود و دریافت JWT
GET/api/transactionsدریافت، فیلتر، مرتب‌سازی و صفحه‌بندی
GET/api/transactions/{id}دریافت یک تراکنش متعلق به کاربر
POST/api/transactionsایجاد تراکنش
PUT/api/transactions/{id}ویرایش تراکنش متعلق به کاربر
DELETE/api/transactions/{id}حذف تراکنش متعلق به کاربر
GET/api/categoriesدریافت دسته‌بندی‌های عمومی
GET/api/dashboardدریافت محاسبات مالی و فعالیت‌های اخیر
۰۷امنیت

ایمن به‌صورت پیش‌فرض

🔑

احراز هویت مبتنی بر JWT برای هر عملیات محافظت‌شدهٔ API

🔒

هش گذرواژه با BCrypt — گذرواژهٔ خام هرگز ذخیره نمی‌شود

🛡️

کنترل مالکیت منابع کاربر برای جلوگیری از آسیب‌پذیری IDOR

🕵️

پاسخ 404 برای منابع غیرقابل‌دسترسی، بدون افشای وجود آن‌ها

✅

اعتبارسنجی سمت سرور با FluentValidation روی هر درخواست

⚠️

مدیریت متمرکز استثناها با پاسخ خطای یکپارچه

📦

DTOها از افشای مستقیم موجودیت‌های پایگاه داده جلوگیری می‌کنند

💰

مقادیر مالی با دقت ثابت decimal / numeric(18,2)

۰۸نقشه راه

مسیر پیش رو

نسخهٔ اصلی کاملاً تکمیل شده است. همهٔ موارد مرحلهٔ فعلی تحویل داده شده‌اند؛ مراحل بعدی در حال بررسی هستند.

نسخهٔ اصلی
تکمیل‌شده
احراز هویت JWT، هش BCrypt، مدیریت تراکنش، فیلترها، صفحه‌بندی، مرتب‌سازی، دسته‌بندی‌ها، محاسبات داشبورد، اعتبارسنجی، مدیریت خطا، کنترل مالکیت، نمودارهای Recharts و ساختار لایه‌ای.
مرحلهٔ بعدی
در حال بررسی
بودجه‌بندی، تراکنش‌های دوره‌ای، خروجی داده، تحلیل‌های پیشرفته‌تر، اعلان‌ها و شخصی‌سازی گسترده‌تر.
۰۹تیم

آشنایی با برنامه‌نویس

ایلیا فراهانی
ایلیا فراهانی · Ilia Farahani
برنامه‌نویس ارشد پروژه

«نرم‌افزار قابل‌اعتماد از مرزبندی روشن و تصمیم‌های سنجیده آغاز می‌شود.»

@here-is-leo در گیت‌هاب ←